/*基础数据请求地址*/
import { get, post, put, del, getFile } from '../request'

//协议
export const getAgreement = (param) => get('api/v2/Agreement', param)  //获取协议
export const addAgreement = (param) => post('api/v2/Agreement', param)  //新增协议
export const editAgreement = (param) => put('api/v2/Agreement/' + param.id, param)  //修改协议
export const delAgreement = (id) => del(`api/v2/Agreement/${id}`)  //删除协议

//证件类型
export const getIdentificationType = (param) => get('api/v2/IdentificationType', param)  //获取证件类型
export const addIdentificationType = (param) => post('api/v2/IdentificationType', param)  //新增证件类型
export const editIdentificationType = (param) => put('api/v2/IdentificationType/' + param.id, param)  //修改证件类型
export const delIdentificationType = (id) => del(`api/v2/IdentificationType/${id}`)  //删除证件类型

//套票类型
export const getTicketPackageType = (param) => get('api/v2/TicketPackageType', param)  //获取套票类型
export const addTicketPackageType = (param) => post('api/v2/TicketPackageType', param)  //新增套票类型
export const editTicketPackageType = (param) => put('api/v2/TicketPackageType/' + param.id, param)  //修改套票类型
export const delTicketPackageType = (id) => del(`api/v2/TicketPackageType/${id}`)  //删除套票类型

//套票标签
export const getTicketPackageLabel = (param) => get('api/v2/TicketPackageLabel', param)  //获取套票标签
export const addTicketPackageLabel = (param) => post('api/v2/TicketPackageLabel', param)  //新增套票标签
export const editTicketPackageLabel = (param) => put('api/v2/TicketPackageLabel/' + param.id, param)  //修改套票标签
export const delTicketPackageLabel = (id) => del(`api/v2/TicketPackageLabel/${id}`)  //删除套票标签

//车票类型
export const getTicketType = (param) => get('api/v2/TicketType', param)  //获取车票类型
export const addTicketType = (param) => post('api/v2/TicketType', param)  //新增车票类型
export const editTicketType = (param) => put('api/v2/TicketType/' + param.id, param)  //修改车票类型
export const delTicketType = (id) => del(`api/v2/TicketType/${id}`)  //删除车票类型

//班车方向
export const getShuttleDirection = (param) => get('api/v2/ShuttleDirection', param)  //获取班车方向
export const addShuttleDirection = (param) => post('api/v2/ShuttleDirection', param)  //新增班车方向
export const editShuttleDirection = (param) => put('api/v2/ShuttleDirection/' + param.id, param)  //修改班车方向
export const delShuttleDirection = (id) => del(`api/v2/ShuttleDirection/${id}`)  //删除班车方向

//系统参数
export const getParameter = (param) => get('api/v2/Parameter', param)  //获取系统参数
export const addParameter = (param) => post('api/v2/Parameter', param)  //新增系统参数
export const editParameter = (param) => put('api/v2/Parameter/' + param.id, param)  //修改系统参数
export const delParameter = (id) => del(`api/v2/Parameter/${id}`)  //删除系统参数

//站点
export const getSchool = (param) => get('api/v2/School', param)  //获取站点
export const addSchool = (param) => post('api/v2/School', param)  //新增站点
export const editSchool = (param) => put('api/v2/School/' + param.id, param)  //修改站点
export const delSchool = (id) => del(`api/v2/School/${id}`)  //删除站点

//站点类型
export const getSchoolType = (param) => get('api/v2/SchoolType', param)  //获取站点类型
export const addSchoolType = (param) => post('api/v2/SchoolType', param)  //新增站点类型
export const editSchoolType = (param) => put('api/v2/SchoolType/' + param.school_type_id, param)  //修改站点类型
export const delSchoolType = (id) => del(`api/v2/SchoolType/${id}`)  //删除站点类型

//站点
export const getStop = (param) => get('api/v2/Stop', param)  //获取站点
export const addStop = (param) => post('api/v2/Stop', param)  //新增站点
export const editStop = (param) => put('api/v2/Stop/' + param.stop_id, param)  //修改站点
export const delStop = (id) => del(`api/v2/Stop/${id}`)  //删除站点

//下车接送方式
export const getLeaveSchoolType = (param) => get('api/v2/LeaveSchoolType', param)  //获取下车接送方式
export const addLeaveSchoolType = (param) => post('api/v2/LeaveSchoolType', param)  //新增下车接送方式
export const editLeaveSchoolType = (param) => put('api/v2/LeaveSchoolType/' + param.id, param)  //修改下车接送方式
export const delLeaveSchoolType = (id) => del(`api/v2/LeaveSchoolType/${id}`)  //删除下车接送方式

//下车座位状态
export const getSeatStatus = (param) => get('api/v2/SeatStatus', param)  //获取座位状态
export const addSeatStatus = (param) => post('api/v2/SeatStatus', param)  //新增座位状态
export const editSeatStatus = (param) => put('api/v2/SeatStatus/' + param.id, param)  //修改座位状态
export const delSeatStatus = (id) => del(`api/v2/SeatStatus/${id}`)  //删除座位状态




//班车模版表
export const getAllShuttle = (param) => get('api/v2/AllShuttle', param)  //获取班车
export const addAllShuttle = (param) => post('api/v2/AllShuttle', param)  //新增班车
export const addAllShuttleGenerateDayShuttle = (param) => post('api/v2/AllShuttle/GenerateDayShuttle', param)  //生成到日班次
// export const copyAllShuttle = (id, param) => post(`api/v2/Shuttle/CopyFrom/${id}`, param) //复制班车
export const editAllShuttle = (param) => put('api/v2/AllShuttle/' + param.row_id, param)  //修改班车
export const delAllShuttle = (id) => del(`api/v2/AllShuttle/${id}`)  //删除班车




//班车表
export const getShuttle = (param) => get('api/v2/Shuttle', param)  //获取班车
export const addShuttle = (param) => post('api/v2/Shuttle', param)  //新增班车
export const copyShuttle = (id, param) => post(`api/v2/Shuttle/CopyFrom/${id}`, param) //复制班车
export const editShuttle = (param) => put('api/v2/Shuttle/' + param.shuttle_id, param)  //修改班车
export const delShuttle = (id) => del(`api/v2/Shuttle/${id}`)  //删除班车





//班车套票表
export const getShuttlePackage = (param) => get('api/v2/ShuttlePackage', param)  //获取班车套票
export const addShuttlePackage = (param) => post('api/v2/ShuttlePackage', [param])  //新增班车套票
export const editShuttlePackage = (param) => put(`api/v2/ShuttlePackage/${param.shuttle_id}/${param.packag_type_id}/${param.ticket_typall_id}`, param)  //修改班车套票
export const editShuttlePackageList = (param) => put('api/v2/ShuttlePackage', param)  //批量修改班车套票
export const delShuttlePackage = (param) => del(`api/v2/ShuttlePackage/${param.shuttle_id}/${param.packag_type_id}/${param.ticket_typall_id}`)  //删除班车套票
export const delShuttlePackageList = (param) => del(`api/v2/ShuttlePackage`, param)  //批量删除班车套票
export const delShuttlePackageBySid = (id) => del(`api/v2/ShuttlePackage/${id}`,)  //删除班车所有套票

//班车套票表模版
export const getAllShuttlePackage = (param) => get('api/v2/AllShuttlePackag', param)  //获取班车套票
export const addAllShuttlePackage = (param) => post('api/v2/AllShuttlePackag', param)  //新增班车套票
export const editAllShuttlePackage = (param) => put(`api/v2/AllShuttlePackag/${param.row_id}`, param)  //修改班车套票
export const editAllShuttlePackageList = (param) => put('api/v2/AllShuttlePackag/Batch', param)  //批量修改班车套票
export const delAllShuttlePackage = (param) => del(`api/v2/AllShuttlePackag/${param.row_id}`)  //删除班车套票
export const delAllShuttlePackageList = (param) => del(`api/v2/AllShuttlePackag/Batch`, param)  //批量删除班车套票
// export const delAllShuttlePackageBySid = (id) => del(`api/v2/AllShuttlePackag/${id}`,)  //删除班车所有套票



//班车站点表
export const getShuttleStop = (param) => get('api/v2/ShuttleStop', param)  //获取班车站点
export const addShuttleStop = (param) => post('api/v2/ShuttleStop', param)  //新增班车站点
export const editShuttleStop = (param) => put(`api/v2/ShuttleStop/${param.shuttle_id}/${param.stop_id}/${param.shuttle_direction_id}`, param)  //修改班车站点
export const editShuttleStopList = (param) => put(`api/v2/ShuttleStop`, param)  //批量修改班车站点
export const delShuttleStop = (param) => del(`api/v2/ShuttleStop/${param.shuttle_id}/${param.stop_id}/${param.shuttle_direction_id}`)  //删除班车站点
export const delShuttleStopList = (param) => del(`api/v2/ShuttleStop/deleteList`, param)  //批量删除班车站点
export const delShuttleStopBySid = (id) => del(`api/v2/ShuttleStop/${id}`)  //删除班车所有站点



//班车站点表模版
export const getAllShuttleStop = (param) => get('api/v2/AllShuttleStop', param)  //获取班车站点
export const addAllShuttleStop = (param) => post('api/v2/AllShuttleStop', param)  //新增班车站点
export const editAllShuttleStop = (param) => put(`api/v2/AllShuttleStop/${param.row_id}`, param)  //修改班车站点
export const editAllShuttleStopList = (param) => put(`api/v2/AllShuttleStop/Batch`, param)  //批量修改班车站点
export const delAllShuttleStop = (param) => del(`api/v2/AllShuttleStop/${param.row_id}`)  //删除班车站点
export const delAllShuttleStopList = (param) => del(`api/v2/AllShuttleStop/Batch`, param)  //批量删除班车站点

// export const delAllShuttleStopBySid = (id) => del(`api/v2/ShuttleStop/${id}`)  //删除班车所有站点

//班车站点表
export const getShuttleSchool = (param) => get('api/v2/ShuttleSchool', param)  //获取班车站点
export const delShuttleSchool = (param) => del(`api/v2/AllShuttleSchool/${param.row_id }`)  //删除班车站点
export const delShuttleSchoolBySid = (id) => del(`api/v2/ShuttleSchool/${id}`)  //删除班车所有站点
export const getAllShuttleSchool = (param) => get('api/v2/AllShuttleSchool', param)  //查询班车站点模板
export const addShuttleSchool = (param) => post('api/v2/AllShuttleSchool', param)  //新增班车站点模板
export const editShuttleSchool = (param) => put('api/v2/AllShuttleSchool/'+param.row_id, {...param})  //新增班车站点模板



//班车站点表模版
// export const getAllShuttleSchool = (param) => get('api/v2/AllShuttleSchool', param)  //获取班车站点
// export const addAllShuttleSchool = (param) => post(`api/v2/AllShuttleSchool/Batch`)  //新增班车站点
// export const delAllShuttleSchool = (param) => del(`api/v2/AllShuttleSchool/${param.row_id}`)  //删除班车站点
// export const delAllShuttleSchoolBySid = (id) => del(`api/v2/AllShuttleSchool/${id}`)  //删除班车所有站点


//班车座位表
export const getShuttleSeat = (param) => get('api/v2/ShuttleSeat', param)  //获取班车座位表
export const getDistinctShuttleSeat = (param) => get('api/v2/ShuttleSeat/DistinctShuttleSeat', param)  //获取班车座位表
export const addShuttleSeat = (param) => post('api/v2/ShuttleSeat', param)  //新增班车座位表
export const editShuttleSeat = (param) => put(`api/v2/ShuttleSeat/${param.shuttle_seat_id}/${param.seat_no}`, param)  //修改班车座位表
export const editShuttleSeatList = (param) => put(`api/v2/ShuttleSeat/${param.shuttle_seat_id}`, param)  //批量修改班车座位表
export const delShuttleSeat = (param) => del(`api/v2/ShuttleSeat/${param.shuttle_seat_id}/${param.seat_no}`)  //删除班车座位表
export const delShuttleSeatBySid = (id) => del(`api/v2/ShuttleSeat/${id}`)  //删除班车所有座位
export const clearMonthTicket = (id) => del(`api/v2/ShuttleSeat/ClearMonthTicket?shuttle_seat_id=${id}`)  //删除班车所有座位
export const changeShuttleSeatName = (param) => put(`api/v2/ShuttleSeat/ChangeShuttleSeatName/${param.shuttle_seat_id}/${param.new_shuttle_seat_name}`)  //修改班车座位表名称
export const getAllShuttleSeat = (param) => get(`api/v2/ShuttleSeat/DistinctShuttleSeat`, param)  //获取所有班车座位表
export const changeShuttleSeatLineName = (param) => put(`api/v2/ShuttleSeat/ChangeShuttleSeat/${param.shuttle_seat_id}`, param)  //修改班车座位线路名称
export const changeAllShuttleSeatSeatName = (param) => put(`api/v2/AllShuttleSeat/Rename/${param.shuttle_seat_id}`, param)  //修改班车座位表名称


//班车座位表模版
export const getShuttleSeatAll = (param) => get('api/v2/AllShuttleSeat', param)  //获取班车座位表
export const delShuttleSeatAll = (param) => del(`api/v2/AllShuttleSeat/${param.row_id}`)  //删除班车座位表
export const editShuttleSeatAll = (param) => put(`api/v2/AllShuttleSeat/${param.row_id}`, param)  //修改班车座位表
export const addShuttleSeatAll = (param) => post('api/v2/AllShuttleSeat/Batch', param)  //新增班车座位表










//订单管理
export const getOrder = (param) => get('api/v2/Order', param)  //获取班车座位表
export const addOrder = (param) => post('api/v2/Order', [param])  //新增班车座位表
export const editOrder = (param) => put(`api/v2/Order/${param.out_trade_no}`, param)  //修改班车座位表
export const delOrder = (no) => del(`api/v2/Order/${no}`)  //删除班车座位表
export const getExportOrder = (param) => getFile(`api/v2/Order/ExportOrders`, param); //导出订单
export const getPassengerBySchoolAndMonth = (param) => getFile(`api/v2/Order/GetPassengersBySchoolAndMonth`, param); //导出站点总名单
export const getPassengerGoToSchool = (param) => getFile(`api/v2/Order/GetStudentsGoingToSchool`, param); //导出去程总名单
export const getPassengerLeaveSchool = (param) => getFile(`api/v2/Order/GetStudentsSeatDown`, param); //导出回程总名单
export const getPassengerPhoto = (param) => getFile(`api/v2/Order/download_student_photo`, param); //导出乘客照片

//客户管理
export const getCustomer = (param) => get(`api/v2/Customer`, param) //获取客户
export const editCustomer = (param) => put(`api/v2/Customer/${param.customer_id}`, param) //新增客户

//乘车人管理
export const getPassenger = (param) => get(`api/v2/Passengers`, param) //获取乘车人
export const addPassenger = (param) => post(`api/v2/Passengers`, [param]) //新增乘车人
export const editPassenger = (param) => put(`api/v2/Passengers/${param.passengers_id}`, param) //编辑乘车人
export const delPassenger = (param) => del(`api/v2/Passengers/${param.passengers_id}`) //删除乘车人

//营运组管理
export const getOperationGroup = (param) => get(`api/v2/OperationGroup`, param) //获取营运组
export const addOperationGroup = (param) => post(`api/v2/OperationGroup/${param.operation_group_id}/${param.operation_group_name}`) //新增营运组
export const editOperationGroup = (param) => put(`api/v2/OperationGroup/${param.operation_group_id}/${param.operation_group_name}`) //编辑营运组
export const delOperationGroup = (id) => del(`api/v2/OperationGroup/${id}`) //删除营运组

//统计页
export const getAllOrderCount = () => get(`api/v2/AggregatePage/AllOrderCount`) //全部销量
export const getOrderCountByDay = (start, end) => get(`api/v2/AggregatePage/OrderCountByDay/${start}/${end}`) //按日统计
export const getOrderCountByHour = (date) => get(`api/v2/AggregatePage/OrderCountByHour/${date}`) //按时统计
export const getOrderCountByMonth = (start, end) => get(`api/v2/AggregatePage/OrderCountByMonth/${start}/${end}`) //按月统计


//发布班车信息
export const publicAllData = (id) => get(`api/v1/ShuttleMsgPublic/PublicAllData?is_enforce=true&shuttle_seat_id=${id || ''}`)

//获取班车套票类型
export const getPackageTypeBySchool = (param) => get(`api/v1/ShuttlePackageCustom/getdata`, param)

//订单退款
export const orderRefund = (param) => post(`api/v1/Order/order_refund?out_trade_no=${param.out_trade_no}&refund_amount=${param.refund_amount}`)
// 主动退款
export const orderRefund2 = (param) => post(`api/v2/Order/Refund`, param)

//员工表
export const getEmployeeInf = (param) => {
  rewritePage(param)
  return post('api/v1/AllEmployeeInf/query_data', param)
}  //获取员工
export const addEmployeeInf = (param) => post('api/v1/AllEmployeeInf', param)  //新增员工
export const editEmployeeInf = (param) => put('api/v1/AllEmployeeInf', param)  //修改员工
export const delEmployeeInf = (row_id) => del(`api/v1/AllEmployeeInf?row_id=${row_id}`)  //删除员工

//账套核算区域
export const getZhangTao = (param) => { rewritePage(param); return post('api/v1/AllZhangTaoHeSuanQuYu/query_data', param) }  //获取账套核算区域
export const addZhangTao = (param) => post('api/v1/AllZhangTaoHeSuanQuYu', param)  //新增账套核算区域
export const editZhangTao = (param) => put('api/v1/AllZhangTaoHeSuanQuYu', param)  //修改账套核算区域
export const delZhangTao = (row_id) => del(`api/v1/AllZhangTaoHeSuanQuYu?row_id=${row_id}`)  //删除账套核算区域
export const getZhangTaoMingxi = (param) => { rewritePage(param); return post('api/v1/AllZhangTaoCaoZuoYuanGongMingXi/query_data', param) }  //获取账套操作员明细
export const addZhangTaoMingxi = (param) => post('api/v1/AllZhangTaoCaoZuoYuanGongMingXi', param)  //新增账套操作员明细
export const editZhangTaoMingxi = (param) => put('api/v1/AllZhangTaoCaoZuoYuanGongMingXi', param)  //修改账套操作员明细
export const delZhangTaoMingxi = (row_id) => del(`api/v1/AllZhangTaoCaoZuoYuanGongMingXi?row_id=${row_id}`)  //删除账套操作员明细

//用户表
export const getUser = (param) => { rewritePage(param); return post('api/v1/AllUser/query_data', param) }  //获取用户
export const addUser = (param) => post('api/v1/AllUser', param)  //新增用户
export const editUser = (param) => put('api/v1/AllUser', param)  //修改用户
export const delUser = (row_id) => del(`api/v1/AllUser?row_id=${row_id}`)  //删除用户

//角色表
export const getRole = (param) => { rewritePage(param); return post('api/v1/AllRole/query_data', param) }  //获取角色
export const addRole = (param) => post('api/v1/AllRole', param)  //新增角色
export const editRole = (param) => put('api/v1/AllRole', param)  //修改角色
export const delRole = (row_id) => del(`api/v1/AllRole?row_id=${row_id}`)  //删除角色

//部门表
export const getDepartment = (param) => { rewritePage(param); return post('api/v1/AllDepartment/query_data', param) }  //获取部门
export const addDepartment = (param) => post('api/v1/AllDepartment', param)  //新增部门
export const editDepartment = (param) => put('api/v1/AllDepartment', param)  //修改部门
export const delDepartment = (row_id) => del(`api/v1/AllDepartment?row_id=${row_id}`)  //删除部门

//优先购票
export const getPriorityPassengers = (param) => {
  rewritePage(param)
  return post('api/v1/EPriorityPassengers/query_data', param)
}
export const addPriorityPassengers = (param) => post('api/v1/EPriorityPassengers', param)
export const editPriorityPassengers = (param) => put('api/v1/EPriorityPassengers', param)
export const delPriorityPassengers = (row_id) => del(`api/v1/EPriorityPassengers?row_id=${row_id}`)
export const batchAddPriorityPassengers = (param) => post(`api/v1/EPriorityPassengers/Bulk_add2`, param)
export const batchDelPriorityPassengers = (param) => del(`api/v1/EPriorityPassengers/Bulk_delete`, param)
export const batchImportPriorityPassengers = (param) => post(`api/v1/EPriorityPassengers/Bulk_import`, param)
export const publicPriorityPassengers = () => post('api/v1/EPriorityPassengers/Public_Priority_Passengers')


//刷脸数据
export const getFaceRecognition = (param) => get(`api/v3/device/facerecognition/list/paging`, param)
//阿里人脸数据库
export const getAliyunFaceDB = (param) => get(`api/v2/AliyunFace/db`, param)
export const getAliyunFaceEntity = (param) => get(`api/v2/AliyunFace/face`, param)
export const uploadAliyunFacePic = (param) => post(`api/v2/AliyunFace/UploadAliyunFacePic`, param)
export const deleteAliyunFacePic = (param) => del(`api/v2/AliyunFace/DeleteAliyunFacePic`, param)

//后付款
export const getAfterPayment = (param) => get('api/v2/AfterPayment', param)
export const addAfterPayment = (param) => post('api/v2/AfterPayment', [param])
export const editAfterPayment = (param) => put('api/v2/AfterPayment', [param])
export const delAfterPayment = (row_id) => del(`api/v2/AfterPayment/${row_id}`)
export const batchImportAfterPayment = (param) => post(`api/v2/AfterPayment`, param)
export const batchDelAfterPayment = (param) => del(`api/v2/AfterPayment`, param)
export const exportAfterPayment = (param) => getFile(`api/v2/AfterPayment/ExportAfterPayments`, param)  //导出
export const afterPaymentRefund = (param) => post(`api/v1/AfterPayment/after_payment_refund?out_trade_no=${param.out_trade_no}&refund_amount=${param.refund_amount}`)  //退款
export const processedAllFeedback = () => put(`api/v2/AfterPayment/ProcessedAllFeedback`)
//后付款报表
export const getAfterPayStatistics = (param) => get(`api/v2/AfterPayment/AfterPaymentStatistics`, param)

// 后付款站点
export const getAfterPaymentSchool = (param) => get(`api/v2/AfterPaymentSchool`, param);
export const addAfterPaymentSchool = (param) => post(`api/v2/AfterPaymentSchool`, param);
export const editAfterPaymentSchool = (param) => put(`api/v2/AfterPaymentSchool`, param);
export const delAfterPaymentSchool = (id) => del(`api/v2/AfterPaymentSchool/${id}`,)

//请假登记
export const getLeaveRegistration = (param) => get(`api/v2/LeaveRegistration`, param);
export const addLeaveRegistration = (param) => post(`api/v2/LeaveRegistration`, param);
export const editLeaveRegistration = (param) => put(`api/v2/LeaveRegistration/${param.row_id}`, param);
export const delLeaveRegistration = (id) => del(`api/v2/LeaveRegistration/${id}`,)
export const exportLeaveRegistration = (param) => getFile(`api/v2/LeaveRegistration/ExportLeaveRegistration`, param)
//检票数据
export const getCheckTicket = (param) => get(`api/v2/Caretake/CheckTicket`, param)

// 照管员管理
export const getCaretakerData = (param) => get(`api/v2/Caretaker`, param)
export const editCaretakerData = (param) => put(`api/v2/Caretaker/${param.row_id}`, param)
export const addCaretakerData = (param) => post(`api/v2/Caretaker`, param)
export const delCaretakerData = (id) => del(`api/v2/Caretaker/${id}`,)

// 司机管理
export const getDriverData = (param) => get(`api/v2/Driver`, param)
export const editDriverData = (param) => put(`api/v2/Driver`, param)
export const addDriverData = (param) => post(`api/v2/Driver`, param)
export const delDriverData = (id) => del(`api/v2/Driver/${id}`,)

// 车辆管理
export const getVehicleData = (param) => get(`api/v2/Vehicle`, param)
export const editVehicleData = (param) => put(`api/v2/Vehicle`, param)
export const addVehicleData = (param) => post(`api/v2/Vehicle`, param)
export const delVehicleData = (id) => del(`api/v2/Vehicle/${id}`,)

// 点名管理人信息管理
export const getRollCallAdminData = (param) => get(`api/v2/RollcallAdmin`, param)
export const editRollCallAdminData = (param) => put(`api/v2/RollcallAdmin/${param.row_id}`, param)
export const addRollCallAdminData = (param) => post(`api/v2/RollcallAdmin`, param)
export const delRollCallAdminData = (id) => del(`api/v2/RollcallAdmin/${id}`,)

// 班车基础点名信息
export const getRollCallBasicShuttleData = (param) => get(`api/v2/RollcallBasicShuttle`, param)
export const editRollCallBasicShuttleData = (param) => put(`api/v2/RollcallBasicShuttle`, param)
export const addRollCallBasicShuttleData = (param) => post(`api/v2/RollcallBasicShuttle`, param)
export const delRollCallBasicShuttleData = (id) => del(`api/v2/RollcallBasicShuttle?row_id=${id}`)
export const generateRollCallBasicShuttleByDate = (param) => post(`api/v2/RollcallBasicShuttle/GenerateDailyShuttleFromBasicShuttle/${param.date}?generate_mode=${param.generate_mode || 1}`)
export const generateRollCallBasicShuttleFromShuttleSeat = (param) => post(`api/v2/RollcallBasicShuttle/GenerateBasicShuttleFromShuttleSeat`, param)
export const batchAddRollCallBasicShuttleData = (param) => post(`api/v2/RollcallBasicShuttle/AddOrUpdate`, param)
export const getNotUploadPicCount = (param) => get('api/v2/RollcallBasicShuttle/NotUploadPicCount', param)

// 班车基础点名座位信息（班车基础点名信息明细表）
export const getRollCallBasicShuttleSeatData = (param) => get(`api/v2/RollcallBasicShuttleSeat`, param)
export const editRollCallBasicShuttleSeatData = (param, ignoreAllNullColumns = true) => put(`api/v2/RollcallBasicShuttleSeat/${param.row_id}?ignoreAllNullColumns=${ignoreAllNullColumns}`, param)
export const addRollCallBasicShuttleSeatData = (param) => post(`api/v2/RollcallBasicShuttleSeat`, param)
export const delRollCallBasicShuttleSeatData = (id) => del(`api/v2/RollcallBasicShuttleSeat?row_id=${id}`)
export const batchAddRollCallBasicShuttleSeatData = (param) => post(`api/v2/RollcallBasicShuttleSeat/AddOrUpdate`, param)

// 班车基础点名站点
export const getRollCallBasicShuttleStopData = (param) => get(`api/v2/RollcallBasicShuttleStop`, param)
export const editRollCallBasicShuttleStopData = (param) => put(`api/v2/RollcallBasicShuttleStop/${param.row_id}`, param)
export const addRollCallBasicShuttleStopData = (param) => post(`api/v2/RollcallBasicShuttleStop`, param)
export const delRollCallBasicShuttleStopData = (id) => del(`api/v2/RollcallBasicShuttleStop?row_id=${id}`)
export const batchAddRollCallBasicShuttleStopData1 = (param) => post(`api/v2/RollcallBasicShuttleStop/batch`, param)
export const batchAddRollCallBasicShuttleStopData = (param) => put(`api/v2/RollcallBasicShuttleStop/AddOrUpdate`, param)

// 班车每日点名信息
export const getRollCallDailyShuttleData = (param) => get(`api/v2/RollcallDailyShuttle`, param)
export const editRollCallDailyShuttleData = (param) => put(`api/v2/RollcallDailyShuttle`, param)
export const addRollCallDailyShuttleData = (param) => post(`api/v2/RollcallDailyShuttle`, param)
export const delRollCallDailyShuttleData = (id) => del(`api/v2/RollcallDailyShuttle?row_id=${id}`,)
export const getRollCallDailyStatistics = param => get(`api/v2/RollcallDailyShuttle/Summary`, param)

// 班车每日点名座位信息（班车每日点名信息明细表）
export const getRollCallDailyShuttleSeatData = (param) => get(`api/v2/RollcallDailyShuttleSeat`, param)
export const editRollCallDailyShuttleSeatData = (param, ignoreAllNullColumns = true) => put(`api/v2/RollcallDailyShuttleSeat/${param.row_id}?ignoreAllNullColumns=${ignoreAllNullColumns}`, param)
export const addRollCallDailyShuttleSeatData = (param) => post(`api/v2/RollcallDailyShuttleSeat`, param)
export const delRollCallDailyShuttleSeatData = (id) => del(`api/v2/RollcallDailyShuttleSeat?row_id=${id}`,)
export const rollCallDailyShuttleLeave = (param) => put(`api/v2/RollcallDailyShuttleSeat/Leave`, [param])
export const rollCallDailyShuttleCancelLeave = (id) => put(`api/v2/RollcallDailyShuttleSeat/LeaveCancel/${id}`)

// 班车每日点名站点
export const getRollCallDailyShuttleStopData = (param) => get(`api/v2/RollcallDailyShuttleStop`, param)
export const editRollCallDailyShuttleStopData = (param) => put(`api/v2/RollcallDailyShuttleStop/${param.row_id}`, param)
export const addRollCallDailyShuttleStopData = (param) => post(`api/v2/RollcallDailyShuttleStop`, param)
export const delRollCallDailyShuttleStopData = (id) => del(`api/v2/RollcallDailyShuttleStop?row_id=${id}`)

// 点名班车微信推送记录
export const getRollCallWechatPushData = (param) => get(`api/v2/RollcallWechatPush`, param)
export const rollCallWechatPushData = (id) => post(`api/v2/RollcallWechatPush/push_msg?row_id=${id}`)


//传入分页格式重写
function rewritePage (param) {
  param.page = {
    pagenumber: param['page.no'] || 1,
    pagesize: param['page.size'] || 0,
  };
  delete param['page.no']
  delete param['page.size'];
}
